package love.xiaohh.datasource.entities.user;

import com.alibaba.fastjson.JSON;

import java.io.Serializable;

/**
 * <p>
 * 用户
 * </p>
 *
 * @author tanghai
 * @version 1.0
 * @date 2021-12-03 星期五 11:52:05
 * @file User.java
 */
public class User implements Serializable {

    /**
     * 用户id
     */
    private Long userId;

    /**
     * 用户名
     */
    private String username;

    /**
     * 年龄
     */
    private Integer age;

    public Long getUserId() {
        return userId;
    }

    public User setUserId(Long userId) {
        this.userId = userId;
        return this;
    }

    public String getUsername() {
        return username;
    }

    public User setUsername(String username) {
        this.username = username;
        return this;
    }

    public Integer getAge() {
        return age;
    }

    public User setAge(Integer age) {
        this.age = age;
        return this;
    }

    /**
     * 重写转换为字符串的方法，方便调试
     *
     * @return 转换后的字符串
     */
    @Override
    public String toString() {
        return JSON.toJSONString(this);
    }
}
